<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= @page_title %> || Ksh&ecirc;ma <%= APP_VERSION %> @ <%= APP_NAME %></title>

  <!-- css de internet para formularios -->
  <%=  stylesheet_link_tag 'wforms' %>
  <!-- css generado por rails -->
  <%=  stylesheet_link_tag 'exscaffold' %>
  <!-- css para widgEditor -->
  <%=  stylesheet_link_tag 'widgEditor' %>

  <!-- para utilizar el widgEditor -->
  <script language="JavaScript" src="/javascripts/widgEditor.js"></script>

  <!-- para utilizar AJAX -->
  <%=  javascript_include_tag :defaults %>

  <!-- <%#"red" or "blue", or "silver", or nil for the default!%> -->
  <%=  calendar_date_select_includes "silver" %>

	<!-- para los Spry de DreamWeaver -->
	<script src="/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
	<link href="/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
  
  	<!-- para los FusinoCharts -->
  	<script language="JavaScript" src="/javascripts/FusionCharts.js"></script>
	
	<%= yield :head%>
</head>
<body>
	<div id="container">
		<div id="top_bar" align="right">
			<!-- el top bar se refresca cada 10 segundos -->
			<%= periodically_call_remote :url=>{:action=>'top_bar_refresh', :controller=>'main'}, :update=>'reload', :frequency=>10.seconds%>
			<div id="reload"><%= render :partial=>'layouts/top_bar'%></div>
			<%= render :partial=>'layouts/top_menu' %>
		</div>
		<div id="main">
			<div id="main_body">
				<%if flash[:success] %><div class="flash_success"><%=  flash[:success] %></div><%end%>
				<%if flash[:error]%><div class="flash_error"><%=  flash[:error] %></div><%end%>
				<%if flash[:notice] %><div class="flash_notice"><%=  flash[:notice] %></div><%end%>
				<%=  yield %>
			</div>
			<!-- el side_bar se refresca cada 5 minutos -->
			<%= periodically_call_remote :url=>{:action=>'side_bar_refresh', :controller=>'main'}, :update=>'side_bar', :frequency=>5.minutes%>
			<div id="side_bar">
				<%= render :partial=>'layouts/side_bar'%>
			</div>
			<div id="footer">
				<%= render :partial=>'layouts/footer'%>
			</div>
		</div>
	</div>
</body>
</html>